#ifndef PWM_H
#define PWM_H

#include "Cpu.h"

/*定义PWM通道的IO和定时器，还有初始频率和占空比*/
#define PWM_OUT1_GPIO PORT_A
#define PWM_OUT1_PIN GPIO_2
#define PWM_TIM_ID TIM0_ID
#define PWM_FRE 200
#define PWM_DUTY 90
#define PWM_MAX_COUNTER 625000/PWM_FRE

extern uint8_t SetPWM(uint32_t fre, uint8_t duty);
extern void PWM_Init(void);

#endif 
